package com.itheima.a06extends;

public class SharPei extends Dog{
    //沙皮狗吃的是狗粮和骨头,父类Dog(吃狗粮)无法满足沙皮狗的需求,所以要重写

    @Override
    public void eat() {
        super.eat();    //父类的eat,吃狗粮
        System.out.println("沙皮狗吃骨头");
    }
}
